{% extends "base.html" %}

{% block content %}
    <h1>类别列表</h1>
    <a href="{% url 'create_category' %}" class="btn btn-primary mb-3">新增类别</a>
    <table class="table">
        <thead>
            <tr>
                <th>终端类型</th>
                <th>类别</th>
            </tr>
        </thead>
        <tbody>
            {% for category in categories %}
                <tr>
                    <td>{{ category.type }}</td>
                    <td>{{ category.category }}</td>
                </tr>
            {% endfor %}
        </tbody>
    </table>
{% endblock %}